package luj.tool.jnproxyan.proxy.network.socks.cmd.connect;

import luj.net.api.connection.NetDisconnectListener;
import luj.net.api.server.ConnectionAcceptInitializer;

final class P2sDisconnect implements NetDisconnectListener {

  P2sDisconnect(ConnectionAcceptInitializer.Connection c2pConn) {
    _c2pConn = c2pConn;
  }

  @Override
  public void onDisconnect(Context ctx) {
    _c2pConn.close();
  }

  private final ConnectionAcceptInitializer.Connection _c2pConn;
}
